<?php
	class Tabla33{

		private $id;
		private $id_empresa;

		private $costo;
		private $participacion1;
		private $participacion2;
		private $participacion3;
		private $costo1;
		private $costo2;
		private $costo3;
		private $costo4;
		private $costo5;
		private $costo6;
		private $costo7;
		private $costo8;
		
		private $archivo;

		public function __construct($id = 0){
			$this->id = $id;
			if($this->id > 0){
				$sql = "SELECT * FROM png_tabla33 WHERE id_empresa = ".$id;
				$query = new Consulta($sql);
				if($query->NumeroRegistros() > 0){
					$row = $query->VerRegistro();
					$this->id_empresa = $row['id_empresa'];

					$this->costo = $row['costo'];
					$this->participacion1 = $row['participacion1'];
					$this->participacion2 = $row['participacion2'];
					$this->participacion3 = $row['participacion3'];
					$this->costo1 = $row['costo1'];
					$this->costo2 = $row['costo2'];
					$this->costo3 = $row['costo3'];
					$this->costo4 = $row['costo4'];
					$this->costo5 = $row['costo5'];
					$this->costo6 = $row['costo6'];
					$this->costo7 = $row['costo7'];
					$this->costo8 = $row['costo8'];

					$this->archivo 	= $row['archivo'];
				}					
			}
		}

		public function __get($atributo){
			return $this->$atributo;	
		}

	}
?>